<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>操作详细</title>
    <script src="../../../resources/app/all.js" type="text/javascript"></script>
    <style type="text/css">
        a:link {
            text-decoration: none;
        }

        a:visited {
            text-decoration: none;
        }

        a:hover {
            text-decoration: none;
        }

        a:active {
            text-decoration: none;
        }

        #tag_ids2 a {
            padding: 2px 5px;
            background: #5FB878;
            border-radius: 2px;
            color: #fff;
            display: block;
            line-height: 20px;
            height: 24px;
            margin: 2px 5px 2px 0;
            float: left;
        }

    </style>
</head>
<body class="easyui-layout" data-options="fit:true">

<div data-options="region:'center'" style="padding: 5px;">
    <form class="layui-form layui-form-pane" action="" id="form" lay-filter="example">
        <div class="layui-form-item">
            <label class="layui-form-label">操作模块</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入任务名称"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">访问地址</label>
            <div class="layui-input-block">
                <input type="text" name="operUrl" lay-verify="required" autocomplete="off" placeholder="请输入任务名称"
                       class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">登录地址</label>
            <div class="layui-input-block">
                <input type="text" name="operLocation" lay-verify="required" autocomplete="off" placeholder="请输入任务名称"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">操作方式</label>
            <div class="layui-input-block">
                <input type="text" name="requestMethod" lay-verify="required" autocomplete="off" placeholder="请输入任务名称"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">操作方法</label>
            <div class="layui-input-block">
                <input type="text" name="method" lay-verify="required" autocomplete="off"
                       placeholder="请输入调用目标"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">请求参数</label>
            <div class="layui-input-block">
                <input type="text" name="operParam" lay-verify="required" autocomplete="off"
                       placeholder="请输入cron执行表达式"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">返回参数</label>
            <div class="layui-input-block">
                <input type="text" name="jsonResult" lay-verify="required" autocomplete="off"
                       placeholder="请输入cron执行表达式"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">操作状态</label>
                <div class="layui-input-block">
                    <input type="text" name="status" lay-verify="required" autocomplete="off" placeholder="请输入任务名称"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">操作时间</label>
                <div class="layui-input-block">
                    <input type="text" name="operTime" lay-verify="required" autocomplete="off" placeholder="请输入任务名称"
                           class="layui-input">
                </div>
            </div>
        </div>

    </form>
</div>
<div data-options="region:'south',border:false">
    <div class="dialog-button">
        <button id="cancel" class="layui-btn layui-btn-primary">取消</button>
    </div>
</div>

<script>
    layui.use(['form'], function () {
        var form = layui.form
            , layer = layui.layer;
        let parData = ToolUtil.OpenData();
        let data = parData.data;
        data.operLocation = data.operName + "/" + data.operIp + "/" + data.operLocation;
        data.operTime = formatDateTime(new Date(data.operTime));
        data.status = data.status==='0'?'正常':'异常';
        data.title = data.title+"/"+data.businessType;
        form.val('example', JSON.parse(JSON.stringify(data)));

        layui.$('#cancel').on('click', function () {
            clear();
        });

        function clear() {
            let index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
            layer.close(index);
        }


    });
</script>
</body>
</html>